<g:if test="${congNghe?.nguyenCongs?.size()>0}">
<div class="marginLeftLarge marginTopLarge">

    <div class="marginTopLarge">
        <table>
            <tr>
                <th><g:message code="bang.tenNguyenCong.buoc" /></th>
                <th><g:message code="bang.tenNguyenCong.ten" /></th>
                <th><g:message code="bang.tenNguyenCong.donVi" /></th>
                <th><g:message code="bang.tenNguyenCong.may" /></th>
                <th><g:message code="bang.tenNguyenCong.khuanGa"/></th>
                <th><g:message code="bang.tenNguyenCong.ghiChu"/></th>
                <th>Actions</th>
            </tr>
            <g:each in="${congNghe?.nguyenCongs}" var="nguyenCong" status="i">
                <tr>
                    <td> ${i +1}</td>
                    <td>${nguyenCong?.ten}</td>
                    <td>${nguyenCong?.toSanXuat?.ten}</td>
                    <td>${nguyenCong?.may}</td>
                    <td>${nguyenCong?.khuanGa}</td>
                    <td>${nguyenCong?.ghiChu}</td>

                    <g:form>
                        <input name='nguyenCongId' value="${nguyenCong?.id}" type="hidden" />

                        <td>
                            <span class="marginRightStd">
                                <g:submitButton name="suaNguyenCong" value="${message(code:'default.button.edit.label')}" ></g:submitButton>
                            </span>

                            <span class="marginRightStd">
                                <g:submitButton  name="xoaNguyenCong" value="${message(code:'default.button.delete.label')}"  onclick="return confirm('${message(code: 'default.button.delete.confirm.message', default: 'Are you sure?')}');" ></g:submitButton>
                            </span>

                            <span>
                                <g:submitButton name="upNguyenCong" value="${message(code:'default.button.up.label')}" ></g:submitButton>
                            </span>

                        </td>
                    </g:form>
                </tr>
            </g:each>
        </table>
    </div>
</div>
</g:if>